package cn.itsource;

import cn.itsource.basic.util.CurrentUserUtil;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
@MapperScan("cn.itsource.*.mapper") //*指代org或user或basic   扫描mapper接口生成代理对象
@ServletComponentScan({"cn.itsource.basic.listener"})
public class PetHomeApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(PetHomeApplication.class);
        CurrentUserUtil.applicationContext = run;
    }

}
